﻿using System.ComponentModel;
using OpusSuite.Utility;

namespace OpusSuite.Globalisation.Attributes
{
    public class OpusDisplayAttribute : DisplayNameAttribute
    {
        private readonly string _resourceName;
        private readonly Enums.OpusSuiteResource _resource;
        public OpusDisplayAttribute(Enums.OpusSuiteResource resource, string resourceName)
        {
            _resourceName = resourceName;
            _resource = resource;
        }

        public override string DisplayName
        {
            get { return UIResources.GetMessage(_resource, _resourceName); }
        }
    }
}
